/********************************************************************
 
 Copyright (C), 2012年 dhc. All rights reserved.
 
 Filename: 	    MailCCFriendList.h
 
 Author:        muzongcun
 
 Version:       1.0
 
 Description:   MailCCFriendList
 
 History:
 
 muzongcun    2012/3/10     1.0     Create
 
 *********************************************************************/

#import <UIKit/UIKit.h>
#import "UserTaskDelegate.h"
#import "EGORefreshTableFooterView.h"
#import "EGORefreshTableHeaderView.h"

@protocol MailCCFriendListDelegate

-(void)addCCMailContact:(id)obj;

@end


@interface MailCCFriendList :UIViewController <UITableViewDelegate,UITableViewDataSource,UISearchBarDelegate,EGORefreshTableFooterDelegate, UserTaskDelegate, EGORefreshTableHeaderDelegate,UISearchDisplayDelegate, UISearchBarDelegate>
{
    EGORefreshTableHeaderView *_refreshHeaderView;
    EGORefreshTableFooterView *_refreshFooterView; 
    BOOL _bIsLoading;
    
	UITableView*                    m_listTV;
	UISearchBar*                    m_searchBar;
	UIButton*                       m_moreBtn;        //更多button
	NSMutableArray*                 m_contentArray;	
    UINavigationBar*                m_navBar;
    NSString *                      m_searchScopeType;  //查找不同的类型（发件人和邮件标题）
    BOOL                            m_bIsSearching;     //是否进程查找
    NSString*                       m_searchText;
	id<MailCCFriendListDelegate>    m_mailCCFriendListDelegate; 
    UISearchDisplayController*      m_searchDisplayController;
    
}



@property (nonatomic,assign) BOOL                          m_bIsSearching;
@property (nonatomic,assign) NSString *                    m_searchScopeType;  
@property (nonatomic,assign) UITableView*                  m_listTV;
@property (nonatomic,assign) UINavigationBar*              m_navBar;
@property (nonatomic,assign) UISearchBar*                  m_searchBar;
@property (nonatomic,retain) NSMutableArray*               m_contentArray;
@property (nonatomic, retain) EGORefreshTableHeaderView *  _refreshHeaderView;
@property (nonatomic, retain) EGORefreshTableFooterView *  _refreshFooterView;
@property (nonatomic,assign) id<MailCCFriendListDelegate>  m_mailCCFriendListDelegate;
@property (nonatomic,assign) UISearchDisplayController*    m_searchDisplayController;

-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil;
/*
 
 */
- (void)doSearch;
-(void) refreshData;
-(NSMutableArray*)readClientList;
-(void)showMoreContact:(id)sender;
-(void)cancelSelected:(id)sender;
@end
